package com.ruoyi.project.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.mapper.YqgMembershipFormMapper;
import com.ruoyi.project.domain.YqgMembershipForm;
import com.ruoyi.project.service.IYqgMembershipFormService;

/**
 * 会员Service业务层处理
 * 
 * @author dr
 * @date 2023-06-01
 */
@Service
public class YqgMembershipFormServiceImpl implements IYqgMembershipFormService 
{
    @Autowired
    private YqgMembershipFormMapper yqgMembershipFormMapper;

    /**
     * 查询会员
     * 
     * @param id 会员主键
     * @return 会员
     */
    @Override
    public YqgMembershipForm selectYqgMembershipFormById(Long id)
    {
        return yqgMembershipFormMapper.selectYqgMembershipFormById(id);
    }

    @Override
    public YqgMembershipForm selectYqgMembershipFormByCardNumber(String cardNumber)
    {
        return yqgMembershipFormMapper.selectYqgMembershipFormByCardNumber(cardNumber);
    }

    /**
     * 查询会员列表
     * 
     * @param yqgMembershipForm 会员
     * @return 会员
     */
    @Override
    public List<YqgMembershipForm> selectYqgMembershipFormList(YqgMembershipForm yqgMembershipForm)
    {
        return yqgMembershipFormMapper.selectYqgMembershipFormList(yqgMembershipForm);
    }

    @Override
    public List<YqgMembershipForm> selectYqgMembershipFormListByDesc(YqgMembershipForm yqgMembershipForm)
    {
        return yqgMembershipFormMapper.selectYqgMembershipFormListByDesc(yqgMembershipForm);
    }

    /**
     * 新增会员
     * 
     * @param yqgMembershipForm 会员
     * @return 结果
     */
    @Override
    public int insertYqgMembershipForm(YqgMembershipForm yqgMembershipForm)
    {
        return yqgMembershipFormMapper.insertYqgMembershipForm(yqgMembershipForm);
    }

    /**
     * 修改会员
     * 
     * @param yqgMembershipForm 会员
     * @return 结果
     */
    @Override
    public int updateYqgMembershipForm(YqgMembershipForm yqgMembershipForm)
    {
        return yqgMembershipFormMapper.updateYqgMembershipForm(yqgMembershipForm);
    }

    /**
     * 批量删除会员
     * 
     * @param ids 需要删除的会员主键
     * @return 结果
     */
    @Override
    public int deleteYqgMembershipFormByIds(Long[] ids)
    {
        return yqgMembershipFormMapper.deleteYqgMembershipFormByIds(ids);
    }

    /**
     * 删除会员信息
     * 
     * @param id 会员主键
     * @return 结果
     */
    @Override
    public int deleteYqgMembershipFormById(Long id)
    {
        return yqgMembershipFormMapper.deleteYqgMembershipFormById(id);
    }
}
